﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.WinControls.UI;
using System.Windows.Forms;

namespace TimeScheduling
{
    public class MyComboBox : RadMultiColumnComboBox
    {
        public MyComboBox()
        {

        }

        protected override void WndProc(ref Message m)
        {
            if (m.Msg == 0x0201 /* WM_LBUTTONDOWN */ || m.Msg == 0x0203 /* WM_LBUTTONDBLCLK */)
            {
                int x = m.LParam.ToInt32() & 0xFFFF;
                if (x >= Width - SystemInformation.HorizontalScrollBarThumbWidth)
                    base.WndProc(ref m);
                else
                {
                    Focus();
                    Invalidate();
                }
            }
            else if (m.Msg == 0x0204)
            {
                return;
            }
            else
                base.WndProc(ref m);
        }
    }

}
